<?php

/**
 * ContainerProfile form base class.
 *
 * @package    form
 * @subpackage container_profile
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseContainerProfileForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'user_id'      => new sfWidgetFormPropelSelect(array('model' => 'User', 'add_empty' => true)),
      'container_id' => new sfWidgetFormPropelSelect(array('model' => 'Container', 'add_empty' => true)),
      'profile_url'  => new sfWidgetFormInput(),
      'thumb_url'    => new sfWidgetFormInput(),
      'nickname'     => new sfWidgetFormInput(),
      'name'         => new sfWidgetFormInput(),
      'city'         => new sfWidgetFormInput(),
      'country'      => new sfWidgetFormInput(),
      'id'           => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'user_id'      => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id', 'required' => false)),
      'container_id' => new sfValidatorPropelChoice(array('model' => 'Container', 'column' => 'id', 'required' => false)),
      'profile_url'  => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'thumb_url'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'nickname'     => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'name'         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'city'         => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'country'      => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'id'           => new sfValidatorPropelChoice(array('model' => 'ContainerProfile', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('container_profile[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ContainerProfile';
  }


}
